package com.zpark.controller;

import com.github.pagehelper.PageInfo;
import com.zpark.pojo.Ranking;
import com.zpark.service.IRankingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class RankingController {

    @Autowired
    IRankingService rankingService;


    @RequestMapping("/page")
    public PageInfo<Ranking> findAll(Integer page, Integer size){
        //调用Service层执行查询数据
        rankingService.findALl(page,size);
        //封装分页信息,创建pageinfo对象
        PageInfo<Ranking> info = new PageInfo<>();
        return info;
    }
}
